package com.xbongbong.lfasr.util;

import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.Charset;
import java.util.List;
import java.util.Random;

public class StringUtil {

    private static Random rand = new Random();
    private static Random randdata = new Random();
    public StringUtil() {
    }

    public static boolean isEmpty(String str) {
        return str == null || "".equalsIgnoreCase(str);
    }

    public static String listToString(List<String> list, String separator) {
        StringBuilder sb = new StringBuilder();

        for (int i = 0; i < list.size(); ++i) {
            sb.append((String) list.get(i));
            if (i < list.size() - 1) {
                sb.append(separator);
            }
        }

        return sb.toString();
    }
}
